package com.heo.protocol.packet;

import org.apache.log4j.Logger;

import com.heo.util.ByteHelper;

public class RebootDeviceResp extends BasePacket
{
  private int BODY_LENGTH = 0;// 包体长0个字节

  private static final String PACKET_NAME = "[重启设备应答包]";
  private static Logger log = Logger.getLogger(RebootDeviceResp.class);

  public RebootDeviceResp(short sequenceId) throws Exception
  {
    super(PACKET_NAME);
    super.totalLength = (short) (HEAD_LENGTH + BODY_LENGTH);
    super.commandId = DeviceCommand.REBOOT_DEVICE_RESP;
    super.sequenceId = sequenceId;
  }

  @Override
  public int getTotalLength()
  {
    return super.HEAD_LENGTH + BODY_LENGTH;
  }

  public RebootDeviceResp(String logHeader, SocketPacket packet) throws Exception
  {
    super.copyPacket(logHeader, PACKET_NAME, packet);
    makeBody();
  }

  @Override
  public byte[] getPacketBody()
  {
    return ByteHelper.margeByte(null, null, null, null, null, null, null, null, null, null);
  }

  public static void main(String[] args)
  {

  }

  @Override
  public void makeBody() throws Exception
  {
    log.debug(super.logHeader + super.packetName + "数据包解析成功。");
  }

}
